<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8"/>
    <title>真不错</title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <link rel="stylesheet" href="/static/layuiNetCompany/res/layui/css/layui.css"/>
    <link rel="stylesheet" href="/static/layuiNetCompany/res/static/css/common.css"/>
    <!--    <link rel="stylesheet" href="/static/layuiNetCompany/res/static/css/index1.css" media="all" />-->
    <!--    <link rel="stylesheet" href="/static/layuiNetCompany/res/static/css/index.css" media="all" />-->
    <script src="/static/layuiNetCompany/res/layui/layui.js"></script>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
</head>

<body>
<!-- nav部分 -->
<div class="nav">
    <!--    <div class="layui-container">-->
    <!-- 公司logo -->
    <div class="nav-logo">
        <a href="/">
            <img src="/static/layuiNetCompany/res/static/image/logo.png" alt="网络公司">
        </a>
    </div>
    <div class="nav-list">
        <!--            <button>-->
        <!--                <span></span><span></span><span></span>-->
        <!--            </button>-->
        <ul id="nav" class="layui-nav" lay-filter="">
            <li class="layui-nav-item"><a href="/">首页</a></li>
            <li class="layui-nav-item"><a href="/index/product">产品</a></li>
            <li class="layui-nav-item"><a href="/index/news">动态</a></li>
            <li class="layui-nav-item"><a href="/index/case">案例</a></li>
            <li class="layui-nav-item"><a href="/index/about">关于</a></li>
        </ul>
    </div>
    <!--    </div>-->
</div>

{__CONTENT__}

<script>

    layui.use(['jquery', 'layer'], function () {
        let $ = layui.$
            , layer = layui.layer;

        let url = window.location.pathname;
        let sets = ['/','/index/product', '/index/news', '/index/case', '/index/about']

        $.each(sets, function (i, v) {
            if (url === v) {
                $("#nav li").eq(i).addClass('layui-this')
            }
        });
    });

</script>
</body>
</html>
